package com.xizi.秋招笔试;

import java.util.Scanner;

/**
 * @author xizizzz
 * @description: TODO
 * @date 2021-8-8上午 10:30
 */
public class B {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        StringBuilder res = new StringBuilder();
        char temp = ' ';
        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) == ' ') {
                continue;
            }
            if (str.charAt(i) == temp) {
                continue;
            }
            temp = str.charAt(i);
            res.append(str.charAt(i));
        }
        System.out.println(res.toString());
    }
}
